package com.winshare.saleAssistant.dao;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.winshare.saleAssistant.domain.dto.req.PageQueryDTO;
import com.winshare.saleAssistant.domain.dto.req.UserQueryDTO;
import com.winshare.saleAssistant.model.TUser;
import com.winshare.saleAssistant.modelVo.LoginCountVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户基础信息 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2020-11-09
 */
public interface TUserMapper extends BaseMapper<TUser> {

    List<TUser> selectUser();

    List<TUser> selectByCondition(UserQueryDTO userQueryDTO);

    Integer getNotMatchTotal();

    List<Map<String, Object>> getNotMatchList(PageQueryDTO pageQueryDTO);

    Integer getTUserCount(@Param("starTime") Date starTime, @Param("endTime") Date endTime, @Param("productName") String productName, @Param("schoolCode") String schoolCode);

    List<TUser> getActivationTotal(@Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    int getAccountTotal(@Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<LoginCountVo> getSexProportion(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    int getUserTotal(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<TUser> getSubjectCount(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<TUser> getLearSectionCount(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<TUser> getUserCountTime(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime, @Param("orderBy") String orderBy, @Param("schoolName") String schoolName);

    Map<String, Object> getPopAge(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    String getSynchronousTime();
}
